package com.github.thinwonton.example.apidoc.controller;

import com.github.thinwonton.example.apidoc.common.Result;
import com.github.thinwonton.example.apidoc.controller.product.param.VideoStructuredAnalysisTasksDTO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@Api(value = "测试用例", position = -1)
@RestController
public class Example2021922Controller {

    @ApiOperation(value = "example2021922")
    @PostMapping("example2021922")
    public ResponseEntity a(@RequestBody VideoStructuredAnalysisTasksDTO dto) {
        return null;
    }

    /**
     * 2021111/400?date=2021-11-233
     * @return
     */
    @ApiOperation(value = "模拟400错误")
    @GetMapping("2021111/400")
    public Result error400(@ApiParam(value = "日期", example = "2021-11-233") Date date) {
        return Result.ok(date);
    }

    @ApiOperation(value = "模拟examplehaha")
    @GetMapping("examplehaha")
    public Result examplehaha(@ApiParam(value = "examplehaha") String haha) {
        return Result.ok(haha);
    }

}
